from wtforms import StringField, IntegerField, FloatField, FieldList, TextField, TextAreaField, FileField
from app.validators.base import BaseForm as Form, SearchForm


class ReportFullTextForm(Form):
    order_number = StringField()


class DeleteReportForm(Form):
    order_number = StringField()


class FullTextForm(SearchForm):
    order_number = StringField()
    start = IntegerField()
    user = IntegerField()

    def __init__(self, g):
        super(FullTextForm, self).__init__()
        self.user.data = g.user.uid

    def validate_start(self, field):
        self.page.data = int(field.data / 500) + 1


class SentenceInfoForm(Form):
    order_number = StringField()
    sentence_index = IntegerField()
